<?php
$html = str_replace('<!--{texto1}-->', $fineArt->texto1, $html);
$html = str_replace('<!--{texto2}-->', $fineArt->texto2, $html);
$html = str_replace('<!--{texto3}-->', $fineArt->texto3, $html);

//imagenes
$colIzq = '';
$colDer = '';
$i=1;
foreach ($fineArt->imagenes() as $img) {
    if ($i<=3 || $i%2 != 0) {
        $colDer .= $imagesTpl;
        $colDer = str_replace('<!--{src}-->', $img->src, $colDer);
    } else {
        $colIzq .= $imagesTpl;
        $colIzq = str_replace('<!--{src}-->', $img->src, $colIzq);
    }
    $i++;
}
$html = str_replace('<!--{imagenesColIzq}-->', $colIzq, $html);
$html = str_replace('<!--{imagenesColDer}-->', $colDer, $html);

$html = str_replace('<!--{url}-->', URL, $html);

$html = preg_replace('/<!-+\{*[A-Za-z0-9]*\}*-+>/', '', $html);
?>
